import http from "../fetchHttp";

// ---------退款原因----------
// 渲染数据
export function getReason() {
    return http({
        url: '/refundReason/getReason',
        method: 'get'
    })
}
// 是否启用
export function changeStateReason(data) {
    console.log("改变的data", data);
    return http({
        url: '/refundReason/changeState',
        method: 'post',
        data: data
    })
}
// 点击查询
export function selectReason(data) {
    console.log("筛选查询的值", data);
    return http({
        url: '/refundReason/selectReason',
        method: 'post',
        data: data
    })
}
// 点击编辑
export function eidtReason(data) {
    console.log("筛选查询的值", data);
    return http({
        url: '/refundReason/eidtReason',
        method: 'post',
        data: data
    })
}
// 点击添加
export function addReason(data) {
    console.log("点击添加的值", data);
    return http({
        url: '/refundReason/addReason',
        method: 'post',
        data: data
    })
}
// 点击删除
export function del(data) {
    console.log("点击添加的值", data);
    return http({
        url: '/refundReason/delReason',
        method: 'post',
        data: data
    })
}


// ---------退货，换货
// 退货查询渲染
export function getRefundGood() {
    return http({
        url: '/refundReason/getRefundGood',
        method: 'get',
    })
}
// 退货筛选
export function selectGood(data) {
    return http({
        url: '/refundReason/selectGood',
        method: 'post',
        data: data
    })
}
// 退款查询渲染
export function getRefundMoney() {
    return http({
        url: '/refundReason/getRefundMoney',
        method: 'get',
    })
}
export function selectMoney(data) {
    return http({
        url: '/refundReason/selectMoney',
        method: 'post',
        data: data
    })
}
// 添加
export function addOrderRefund(data) {
    return http({
        url: '/refundReason/addOrderRefund',
        method: 'post',
        data: data
    })
}
// 修改订单状态为5
export function changeOrderState(data) {
    return http({
        url: '/refundReason/refund',
        method: 'post',
        data: data
    })
}
// 查询订单详情。订单已经处理了的
export function selectSuccess(data) {
    return http({
        url: '/refundReason/selectSuccess',
        method: 'post',
        data: data
    })
}
// 详情订单的处理
export function dealOrderBtn(data) {
    return http({
        url: '/refundReason/dealOrderBtn',
        method: 'post',
        data: data
    })
}
//获取所有订单信息
export function getOrderInfo() {
    return http({
        url: '/refundReason/getOrder',
        method: 'get'
    })
}